import json
from http.server import BaseHTTPRequestHandler

data = {'code': '200', 'type': 'success', 'data': 'this is a server'}


class Request(BaseHTTPRequestHandler):
    def __init__(self):
        pass

    def do_GET(self):
        self.send_response(200)
        self.send_header('Content-type', 'application/json')
        self.end_headers()
        self.wfile.write(json.dumps(data).encode())
